package cn.edu.lingnan.repository;

import cn.edu.lingnan.bean.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRepository extends JpaRepository<User, Integer> {

    //@Modifying
    //@Query(value = "select * from User where userName")
    //List<User> findAllByUserName ()

    //根据用户名查询
    public User findByUserNameAndPassWord(String name, String userName);

}
